/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.jm.financeiro.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author joao
 */
@Entity
@Table(name = "reg", catalog = "salao", schema = "public")
public class Reg implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "nreg", nullable = false)
    private Integer nreg;

    public Reg() {
    }

    public Reg(Integer nreg) {
        this.nreg = nreg;
    }

    public Integer getNreg() {
        return nreg;
    }

    public void setNreg(Integer nreg) {
        this.nreg = nreg;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nreg != null ? nreg.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reg)) {
            return false;
        }
        Reg other = (Reg) object;
        if ((this.nreg == null && other.nreg != null) || (this.nreg != null && !this.nreg.equals(other.nreg))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.jm.financeiro.entity.Reg[ nreg=" + nreg + " ]";
    }
}
